<script setup>

import { onMounted,ref } from 'vue';

var main = ref(null)
  // 基于准备好的dom，初始化echarts实例
  onMounted(()=>{
    let a=main.value
    console.log('A',a);
  })
  const change=()=>{
    let a=main.value
    console.log('A',a);
  }
  
</script>

<template>
  <div>
    <div ref="main" style="width: 600px;height:400px;"></div>
    <button @click="change">修改</button>
  </div>
</template>

<style scoped>

</style>
